#define _CRT_SECURE_NO_WARNINGS  1
#include <stdio.h>

int main() {
    int a = 0;
    scanf("%d", &a);
    int arr[1000];
    int i = 0;
    while (a)
    {
        if (a % 2 == 0)
        {
            a = (a - 2) / 2;
            arr[i] = 3;
        }
        else
        {
            a = (a - 1) / 2;
            arr[i] = 2;
        }
        i++;
    }
    while (i > 0)
    {
        i--;
        printf("%d", arr[i]);
    }
    return 0;
}